<!DOCTYPE html>
<html>
<head>
    <title></title>
		<#include "/header.html">
</head>
<body>
<div id="rrapp" v-cloak>
    <div v-show="showList">
        <div class="grid-btn">
            <div class="grid-select">
                <div class="select-group">
                    <span>产品类型：</span>
                    <select class="select-grid select-qtypeid" style="width: 100px;" v-model="q.typeId">
                        <option value="0">请选择</option>
                        <option v-for="(type, index) of types" :key="index" :value="type.id">{{type.typeName}}</option>
                    </select>
                </div>
            </div>

            <div class="form-group col-sm-2">
                <input type="text" class="form-control" v-model="q.name" @keyup.enter="query" placeholder="产品名称">
            </div>
            <#if shiro.hasPermission("product:productinfo:list")>
            <a class="btn btn-default" @click="query">查询</a>
            </#if>
			<#if shiro.hasPermission("product:productinfo:save")>
            <a class="btn btn-primary" @click="add"><i class="fa fa-plus"></i>&nbsp;新增</a>
			</#if>
			<#if shiro.hasPermission("product:productinfo:update")>
            <a class="btn btn-primary" @click="update"><i class="fa fa-pencil-square-o"></i>&nbsp;修改</a>
			</#if>
			<#if shiro.hasPermission("product:productinfo:delete")>
            <a class="btn btn-primary" @click="del"><i class="fa fa-trash-o"></i>&nbsp;删除</a>
			</#if>
        </div>

        <table id="jqGrid"></table>
        <div id="jqGridPager"></div>
    </div>

    <div v-show="!showList" class="panel panel-default">
        <div class="panel-heading">{{title}}</div>
        <form class="form-horizontal" filter="formData">
                    <div class="form-group">
                        <div class="col-sm-2 control-label">产品类型:</div>
                        <div class="col-sm-10">
                            <select class="select-grid select-productType" style="width: 373px;">
                                <option value="0">请选择</option>
                                <option v-for="(type, index) of types" :key="index" :value="type.id">{{type.typeName}}</option>
                            </select>
                        </div>
                    </div>
					<div class="form-group">
                        <div class="col-sm-2 control-label">产品名称:</div>
                        <div class="col-sm-10">
                            <input type="text" class="form-control" v-model="productInfo.name" placeholder="产品名称"/>
                        </div>
                    </div>
											                    <div class="form-group">
                        <div class="col-sm-2 control-label">工艺:</div>
                        <div class="col-sm-10">
                            <input type="text" class="form-control" v-model="productInfo.technology" placeholder="工艺"/>
                        </div>
                    </div>
											                    <div class="form-group">
                        <div class="col-sm-2 control-label">规格:</div>
                        <div class="col-sm-10">
                            <input type="text" class="form-control" v-model="productInfo.specifications" placeholder="规格"/>
                        </div>
                    </div>
											                    <div class="form-group">
                        <div class="col-sm-2 control-label">厚度:</div>
                        <div class="col-sm-10">
                            <input type="text" class="form-control" v-model="productInfo.thickness" placeholder="厚度"/>
                        </div>
                    </div>
                    
				 	<div class="form-group">
                        <div class="col-sm-2 control-label">描述:</div>
                        <div class="col-sm-10">
                            <input type="text" class="form-control" v-model="productInfo.descs" placeholder="描述"/>
                        </div>
                    </div>

                    <div class="form-group">
                        <div class="col-sm-2 control-label">效果图:</div>
                        <!-- 按钮 -->
                        <div id="btnContainer" class="uploader_btn">选择文件</div>
                        <div id="uploader" class="wu-example">
                            <!-- 保存文件 -->
                            <div id="thelist" class="uploader-list">

                                <div v-for="(pic, index) of picList" class="img_list" :id="pic.id">
                                    <div>
                                        <img :layer-src="src+pic.picAddress" :src="src+pic.picAddress" @click="xmTanUploadImg">
                                    </div>
                                    <span class="close_Img">X</span>
                                </div>
                            </div>
                        </div>

                    </div>
											                   
							            <div class="form-group">
                <div class="col-sm-2 control-label"></div>
                <input type="button" class="btn btn-primary" id="btnSaveOrUpdate" data-loading-text="保存中..." @click="saveOrUpdate" value="确定"/>
                &nbsp;&nbsp;<input type="button" class="btn btn-warning" @click="reload" value="返回"/>
            </div>
        </form>
    </div>
</div>

<script src="${request.contextPath}/statics/js/modules/product/productinfo.js?_${.now?long}"></script>
</body>
<style>
    #thelist {padding-left: 123px;width:1000px;}
    #btnContainer div:nth-child(2){width: 100%!important;height:100%!important;}
</style>
</html>